'\" t
.\"     Title: LOAD
.\"    Author: The PostgreSQL Global Development Group
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 2011-12-01
.\"    Manual: PostgreSQL 9.1.2 Documentation
.\"    Source: PostgreSQL 9.1.2
.\"  Language: English
.\"
.TH "LOAD" "7" "2011-12-01" "PostgreSQL 9.1.2" "PostgreSQL 9.1.2 Documentation"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
LOAD \- load a shared library file
.\" LOAD
.SH "SYNOPSIS"
.sp
.nf
LOAD \*(Aq\fIfilename\fR\*(Aq
.fi
.SH "DESCRIPTION"
.PP
This command loads a shared library file into the
PostgreSQL
server\*(Aqs address space\&. If the file has been loaded already, the command does nothing\&. Shared library files that contain C functions are automatically loaded whenever one of their functions is called\&. Therefore, an explicit
LOAD
is usually only needed to load a library that modifies the server\*(Aqs behavior through
\(lqhooks\(rq
rather than providing a set of functions\&.
.PP
The file name is specified in the same way as for shared library names in
CREATE FUNCTION (\fBCREATE_FUNCTION\fR(7)); in particular, one can rely on a search path and automatic addition of the system\*(Aqs standard shared library file name extension\&. See
Section 35.9, \(lqC-Language Functions\(rq, in the documentation
for more information on this topic\&.
.\" $libdir/plugins
.PP
Non\-superusers can only apply
LOAD
to library files located in
$libdir/plugins/
\(em the specified
\fIfilename\fR
must begin with exactly that string\&. (It is the database administrator\*(Aqs responsibility to ensure that only
\(lqsafe\(rq
libraries are installed there\&.)
.SH "COMPATIBILITY"
.PP

LOAD
is a
PostgreSQL
extension\&.
.SH "SEE ALSO"
.PP

CREATE FUNCTION (\fBCREATE_FUNCTION\fR(7))
